#include <iostream>
#include <ctime>
#include <cstdlib>

int main()
{
	std::srand(std::time(0));
    int T = 1;
    std::cout << T << "\n";
    for (int i = 0; i < T; i++) {
        int n = 50, m = 50;
        std::cout << n << ' ' << m << "\n";
        int tot = rand() % (n * m);
        /* int tot = rand() % (4); */
        std::cout << tot << "\n";
        for (int i = 0; i < tot; i++)
            std::cout << rand() % n + 1 << " " << rand() % m + 1 << "\n";
    }
}

